import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import ElementUI from 'element-ui';
import axios from 'axios'
import 'element-ui/lib/theme-chalk/index.css';
import Login from "@/Login";
import RepairIndex from "@/views/RepairIndex";
import Student from "@/views/student/Student";
import Teacher from "@/views/teacher/Teacher";
import StudentRepair from "@/views/StudentRepair";
import TeacherRepair from "@/views/TeacherRepair";
import SupervisorRepair from "@/views/SupervisorRepair";
import StudentSignin from "@/StudentSignin";
import SubReach from "@/SubReach"
import TeacherSignin from "@/TeacherSignin";
import SupervisorSign from "@/SupervisorSign";
import Supervisor from "@/views/supervisor/Supervisor";
import StudentRepairInfo from "@/views/student/StudentRepairInfo";
import ReachHistory from "@/views/student/ReachHistory";
import Reach from "@/views/student/Reach";
import StartReach from "@/views/teacher/StartReach";
import CheckReachStudent from "@/views/teacher/CheckReachStudent";
import TeacherRepairInfo from "@/views/teacher/TeacherRepairInfo";
import TeacherReachHistory from "@/views/teacher/TeacherReachHistory";
import SupervisorStudent from "@/views/supervisor/SupervisorStudent";
import SupervisorTeacher from "@/views/supervisor/SupervisorTeacher";

Vue.config.productionTip = false

Vue.use(VueRouter)
Vue.use(ElementUI)
Vue.prototype.$ajax=axios


new Vue({
  router:new VueRouter({
    routes:[
      {
        path:"/",
        component:Login
      },
      {
        path: "/sub_reach",
        component: SubReach
      },
      {
        path: "/student_sign" ,
        component: StudentSignin
      },
      {
        path: "/teacher_sign",
        component: TeacherSignin
      },
      {
        path: "/supervisor_sign",
        component: SupervisorSign
      },
      {
        path: "/student_repair",
        component: StudentRepair,
        children:[{
          path:"student",
          component:Student
          },
          {
            path: "student_repair_info",
            component: StudentRepairInfo
          },
          {
            path: "reach_history",
            component: ReachHistory
          },
          {
            path: "reach",
            component: Reach
          }]
      },
      {
        path: "/teacher_repair",
        component: TeacherRepair,
        children:[{
          path:"teacher",
          component:Teacher
        },
          {
            path: "start_reach",
            component: StartReach
          },
          {
            path: "check_reach_student",
            component: CheckReachStudent
          },
          {
            path: "teacher_repair_info",
            component: TeacherRepairInfo
          },
          {
            path: "teacher_reach_history",
            component: TeacherReachHistory
          }]
      },
      {
        path: "/supervisor_repair",
        component: SupervisorRepair,
        children:[{
          path:"supervisor",
          component:Supervisor
        },
          {
            path: "supervisor_student",
            component: SupervisorStudent
          },
          {
            path: "supervisor_teacher",
            component: SupervisorTeacher
          }]
      },
      {
        path: "/re",
        component: RepairIndex
      }
    ]
  }),
  render: h => h(App),
}).$mount('#app')
